-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCC-4407 - EDD Form Prepopulate Patron Email #422
SCC-4407 - EDD Form Prepopulate Patron Email #422
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well just a minor type comment
pages/hold/request/[id]/edd.tsx
Outdated
@@ -250,6 +253,10 @@ export async function getServerSideProps({ params, req, res }) { | |||
|
|||
const patronEligibilityStatus = await fetchPatronEligibility(patronId) | |||
|
|||
// fetch patron's email to pre-populate the edd form if available | |||
const patronData = await getPatronData(patronId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fetching a lot of patron data, though it doesn't appear to be taking a very long time. I still think that instead of using getPatronData
, which builds out a whole my account dataset including checkouts and holds and fines, maybe you can use the MyAccount
model's getPatron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't I still need to initialize a MyAccount data model to use the getPatron function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked offline and I ended up using MyAccount's getPatron function instead of calling getPatronData() since this counterintuitively involves less data instantiation.
Ticket:
This PR does the following:
How has this been tested?
Accessibility concerns or updates
Checklist: